﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContractSearch.aspx.cs" Inherits="Admin.Search.ContractSearch" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link href="/Themes/Default/Css/Style.css" rel="stylesheet" type="text/css" />
    <link href="/Components/EasyUI/themes/icon.css" rel="stylesheet" type="text/css" />
    <script src="/Components/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="/Jscript/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="/Components/EasyUI/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="/Jscript/midsoft.js" type="text/javascript"></script>
    <script src="/Jscript/PopWindow.js" type="text/javascript"></script>
    <script src="/Jscript/CheckBox.js" type="text/javascript"></script>
    <title>合同列表</title>
</head>
<body>
    <form id="form1" runat="server">
    <table style="width: 100%;" cellpadding="2" cellspacing="0" class="workspacesearch">
        <tr>
            <td  class="dt" align=center>查询条件</td>
            <td style="width: 70px" align="center" class="tdbg">
                <b>合同编号：</b>
            </td>
            <td class="tdbg">
                <asp:TextBox ID="txtContractNumber" runat="server"></asp:TextBox>
            </td>
            <td style="width: 70px" align="center" class="tdbg">
                <b>合同名称：</b>
            </td>
            <td class="tdbg">
                <asp:TextBox ID="txtContractName" runat="server"></asp:TextBox>
            </td>
        </tr>
    </table>
    <table border="0" cellpadding="0" cellspacing="1" style="width: 100%;">
        <tr>
            <td>
                总共有 
                <asp:Label ID="lblCount" runat="server" Text="0" ForeColor="Red"></asp:Label>&nbsp;条记录
            </td>
            <td align="right">
                <table>
                    <tr>
                        <td>
                <asp:ImageButton ID="imgBtnSearch" ImageUrl="/Themes/TheOne/images/btn_search.gif"
                    runat="server" OnClick="btnSearch_Click" />
                        </td>
                        <td>
                            <a href="javascript:location.reload();"><img alt="刷新" src="/Themes/TheOne/images/btn_reflash.gif" /></a>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>

    <table width="100%" cellpadding="0" cellspacing="0" border="0" style="border: 1px solid #8fc5dd">
        <tr>
            <td>
                <!--Search end-->
                <table height="350px" border="0" width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td valign="top" height="330px">
                            <asp:GridView ID="gridView" runat="server" AllowPaging="True" Width="100%" CellPadding="4"
                                OnPageIndexChanging="gridView_PageIndexChanging" DataKeyNames="ContractId" 
                                AutoGenerateColumns="False" RowStyle-HorizontalAlign="Center" OnRowCreated="gridView_OnRowCreated"
                                ForeColor="#333333">
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                <Columns>
                    <asp:TemplateField ControlStyle-Width="30" HeaderText="选择"    >
                                <ItemTemplate>
                               <asp:CheckBox ID="checkboxname" name="checkboxname" onclick="javascript:SingleCheckJs();" runat="server" />
                                </ItemTemplate>

<ControlStyle Width="30px"></ControlStyle>
                            </asp:TemplateField>                 
		<asp:BoundField DataField="ProjectInfoId" HeaderText="项目名称" SortExpression="ProjectName" 
                                        ItemStyle-HorizontalAlign="Center"  > 
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                                    </asp:BoundField>
		                            <asp:TemplateField HeaderText="合同编号" SortExpression="ContractNumber">
                                        <ItemTemplate>
                                        <a href="javascript:void(0);" onclick="javascript:openSysiframe('合同详情','/Contract/Show.aspx?id=<%#Eval("ContractId") %>',500,400);"><%#Eval("ContractNumber")%></a>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="合同名称" SortExpression="ContractName">
                                        <ItemTemplate>
                                        <a href="javascript:void(0);" onclick="javascript:openSysiframe('合同详情','/Contract/Show.aspx?id=<%#Eval("ContractId") %>',500,400);"><%#Eval("ContractName")%></a>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
		<asp:BoundField DataField="Unit" HeaderText="签订单位" SortExpression="Unit" 
                                        ItemStyle-HorizontalAlign="Center"  > 
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                                    </asp:BoundField>
		<asp:BoundField DataField="ContractMoney" HeaderText="合同金额" SortExpression="ContractMoney" 
                                        ItemStyle-HorizontalAlign="Center"  > 
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                                    </asp:BoundField>
		<asp:BoundField DataField="ConfirmDate" HeaderText="签订日期" SortExpression="ConfirmDate" 
                                        ItemStyle-HorizontalAlign="Center" DataFormatString="{0:yyyy-MM-dd}" > 
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                                    </asp:BoundField>
		<asp:BoundField DataField="Address" HeaderText="地址" SortExpression="Address" 
                                        ItemStyle-HorizontalAlign="Center"  > 
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="合同下载" SortExpression="FileName">
                                        <ItemTemplate>
                                            <a href="/Uploads/<%#Eval("FileFolder") %>/<%#Eval("FileSaveName") %>" target="_blank"><%#Eval("FileName") %></a>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="合同类型" SortExpression="ContractType">
                                        <ItemTemplate>
                                        <%#Eval("ContractType").ToString()=="0"?"<font color='Red'>主包</font>":"分包"%>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
		<asp:BoundField DataField="CreateTime" HeaderText="创建时间" SortExpression="CreateTime" 
                                        ItemStyle-HorizontalAlign="Center" DataFormatString="{0:yyyy-MM-dd}"  > 
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="查看">
                                        <ItemTemplate>
                                        <a href="javascript:void(0);" onclick="javascript:openSysiframe('查看合同信息','/Contract/Show.aspx?id=<%#Eval("ContractId") %>',500,400);">查看</a>
                                        </ItemTemplate>
                                        <ControlStyle Width="50px" />
                                    </asp:TemplateField>
                                </Columns>
                                <EditRowStyle BackColor="#999999" />
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <HeaderStyle BackColor="#598cbf" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle HorizontalAlign="Center" BackColor="#F7F6F3" ForeColor="#333333"></RowStyle>
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" CssClass=""
                                FirstPageText="首页" HorizontalAlign="Right" LastPageText="末页" NextPageText="下一页"
                                PageIndexBoxType="TextBox" PrevPageText="上一页" ShowCustomInfoSection="Left" ShowInputBox="Always"
                                ShowPageIndexBox="Always" OnPageChanged="AspNetPager1_PageChanged">
                            </webdiyer:AspNetPager>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
